/*
 * @Description: 
 * @Author: fhw
 * @Date: 2023-01-10 10:56:38
 */
import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";
import { IdDto } from "src/common/dto/dto";

export class GetHistorySessionDto {
  @IsNotEmpty({ message: '用户ID不能为空' })
  @ApiProperty({
    type: Number,
    name: 'userId',
    description: '用户ID',
  })
  public readonly userId: number
}
export class CreateHistorySessionDto extends GetHistorySessionDto {
  @IsNotEmpty({ message: '历史用户ID不能为空' })
  @ApiProperty({
    type: String,
    name: 'historicalUserSessionsId',
    description: '历史用户ID',
  })
  public readonly historicalUserSessionsId: string
}
export class GgetHistorySessionInfoDto {
  @ApiProperty({
    type: Number,
    name: 'id',
    description: 'id',
  })
  public readonly id?: number
  @ApiProperty({
    type: Number,
    name: 'userId',
    description: '用户ID',
  })
  public readonly userId?: number

  @ApiProperty({
    type: String,
    name: 'historicalUserSessionsId',
    description: '历史用户ID',
  })
  public readonly historicalUserSessionsId?: string
}
export class UpdateLatestNewsDto {
  @IsNotEmpty({ message: '历史用户ID不能为空' })
  @ApiProperty({
    type: String,
    name: 'historicalUserSessionsId',
    description: '历史用户ID',
  })
  public readonly historicalUserSessionsId: string

  @IsNotEmpty({ message: '用户id不能为空' })
  @ApiProperty({
    type: Number,
    name: 'userId',
    description: '用户id',
  })
  public readonly userId: number
}
export class DeleteHistorySessionDto extends IdDto{
  @IsNotEmpty({ message: '用户ID不能为空' })
  @ApiProperty({
    type: Number,
    name: 'userId',
    description: '用户ID',
  })
  public readonly userId: number
  @IsNotEmpty({ message: '历史用户ID不能为空' })
  @ApiProperty({
    type: String,
    name: 'historicalUserSessionsId',
    description: '历史用户ID',
  })
  public readonly historicalUserSessionsId: string
}
export class UpdateDoNotDisturbDto extends UpdateLatestNewsDto {
  @IsNotEmpty({ message: '免打扰，0：开启，1：关闭' })
  @ApiProperty({
    type: String,
    name: 'doNotDisturb',
    description: '免打扰，0：开启，1：关闭',
    enum: [0, 1],
    example: 1,
  })
  public readonly doNotDisturb: string
}